<div class="row m-n">
    <div tabset type="tab">
        <div tab heading="用户管理" active="activeFlag[0]" ng-click="changeTab(0)">
            <div class="row wrapper-y-sm">
                <div class="operate-bar col-xs-4 font-0">
                    <!-- <button class="btn btn-operate m-r-sm" ng-click="addData()">新增</button> -->
                </div>
                <div class="search-bar wrapper-none col-xs-8">
                    <div class="btn-group m-l-xs pull-right">
                        <button type="button" class="btn btn-default base-color" ng-click="search()" title="刷新">
                            <i class="yb-icon ico-refresh"></i>
                        </button>
                        <button type="button" class="btn btn-default base-color" title="配置表格列"
                            ng-click="switchToolbar('ColConfig');">
                            <i class="yb-icon ico-set"></i>
                        </button>
                    </div>
                    <button class="btn-advance pull-right m-l-xs"
                        ng-click="switchToolbar('AdvanceSearch')">高级搜索</button>
                    <div class="input-group pull-right clearfix">
                        <input type="text" class="form-control txt-search" placeholder="姓名" ng-model="condition.cname">
                        <span class="input-group-addon cursor-pointer" ng-click="search(1)">搜索</span>
                    </div>
                </div>
            </div>
            <div yb-advance-search show-toolbar="toolbarConfig.showAdvanceSearch" search-data="search(1)"
                reset-data="reset()">
                <div class="advance-search m-t-sm">
                    <div class="form-group clearfix">
                        <label class="control-label">手机号：</label>
                        <input type="text" ng-model="condition.mobilePhone" class="form-control">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label">姓名：</label>
                        <input type="text" ng-model="condition.cname" class="form-control">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label">性别：</label>
                        <select class="form-control" ng-model="condition.sex">
                            <option value="">请选择</option>
                            <option value="1">男</option>
                            <option value="0">女</option>
                        </select>
                    </div>
                </div>
            </div>
            <div yb-col-config show-toolbar="toolbarConfig.showColConfig" ng-model="tbConf" col-fixed="true"
                has-check-col="true" set-tb-style="setFixedWidth()"></div>
            <div class="main-area">
                <div yb-table-fixed class="table-fixed-wrap fix-left" ele-count="4" scroll-area="right">
                    <div class="th-fixed">
                        <table class="table-fixed border-none" width="{{tbConf.fixedWidth}}">
                            <thead>
                                <tr>
                                    <th width="40" class="text-center th-check border-l-none">
                                        <div yb-check-box yb-checked="markInfo.allChecked" yb-click="selectAll()"></div>
                                    </th>
                                    <th ng-repeat="itemCol in tbConf.tableCol track by $index" width="{{itemCol.width}}"
                                        ng-show="!!itemCol.isShow && !!itemCol.isFixed">
                                        <div yb-thead-operate ng-model="itemCol" target-width="tbConf.fixedWidth"
                                            fixed-width="tbStyle.scrollLeft"></div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="th-scroll-x" ng-style="tbStyle.scrollLeft">
                        <table class="table-fixed border-none" width="{{tbConf.scrollWidth}}">
                            <thead>
                                <tr>
                                    <th ng-repeat="itemCol in tbConf.tableCol track by $index" width="{{itemCol.width}}"
                                        ng-show="!!itemCol.isShow && !itemCol.isFixed">
                                        <div yb-thead-operate ng-model="itemCol" target-width="tbConf.scrollWidth"></div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll-y">
                        <table class="table-fixed border-none" width="{{tbConf.fixedWidth}}">
                            <tbody>
                                <tr ng-repeat="item in dataList track by $index"
                                    ng-class="{'row-selected': $index === markInfo.curRow}"
                                    ng-click="selectRow($index)">
                                    <td width="40" class="text-center border-l-none">
                                        <div yb-check-box yb-checked="item.isChecked" yb-click="selectSingle(item)"></div>
                                    </td>
                                    <td class="spill-dots" ng-repeat="itemCol in tbConf.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !!itemCol.isFixed"
                                        title="{{item[itemCol.dataField]}}">
                                        <div class="font-0">
                                            <button class="btn btn-operate m-r-xs" ng-click="editData(item)">编辑</button>

                                            <button class="btn btn-operate m-r-xs"
                                                ng-click="switchStatus(item.id, '0')"
                                                ng-disabled="item.status==0">停用</button>

                                            <button class="btn btn-operate m-r-xs"
                                                ng-click="switchStatus(item.id, '1')"
                                                ng-disabled="item.status==1">启用</button>

                                            <button class="btn btn-operate m-r-xs"
                                                ng-click="unBindData(item.id)"
                                                ng-disabled="!item.openId">解绑</button>

                                            <button class="btn btn-operate m-r-xs" ng-click="modifyPhone(item.id)">更改手机号</button>

                                            <button class="btn btn-operate m-r-xs" ng-click="viewBindCars(item)">查看绑定车辆</button>

                                            <button class="btn btn-operate m-r-xs" ng-click="integralLog(item)">积分日志</button>

                                            <button class="btn btn-operate m-r-xs"
                                                ng-click="addCar(item)"
                                                ng-disabled="!btnPermission.VEHICLE_ADD"
                                                title="{{!btnPermission.VEHICLE_ADD?'无权限执行此操作':''}}">新增车辆</button>
                                        </div>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="td-scroll" ng-style="tbStyle.scrollLeft">
                        <table class="table-fixed border-none" width="{{tbConf.scrollWidth}}">
                            <tbody>
                                <tr ng-repeat="item in dataList track by $index"
                                    ng-class="{'row-selected': $index === markInfo.curRow}"
                                    ng-click="selectRow($index)">
                                    <td class="spill-dots" ng-repeat="itemCol in tbConf.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !itemCol.isFixed"
                                        title="{{item[itemCol.dataField]}}">
                                        <span ng-if="!itemCol.clickFn">{{item[itemCol.dataField]}}</span>
                                        <a ng-if="!!itemCol.clickFn" class="btn-operate m-r-xs" ng-click="tdClick(item, itemCol.clickFn)">
                                            {{item[itemCol.dataField]}}
                                        </a>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
            <div class="bottom-area page-bar wrapper-y-sm clearfix">
                <div yb-check-box class="m-t-xs m-r-sm" yb-checked="markInfo.allChecked" yb-check-name="全选"
                    yb-click="selectAll()"></div>
                <div yb-page-info ng-model="pageInfo" yb-refresh="search()"></div>
            </div>
        </div>
        <div tab heading="{{tabFlag.name}}" active="activeFlag[1]" ng-if="activeFlag[1]">
            <form name="form" class="form-horizontal wrapper-md clearfix" novalidate>
                <div class="form-group">
                    <label class="col-xs-2 control-label"><i>*</i><span>手机号</span>：</label>
                    <div class="col-xs-5 wrapper-none" ng-if="tabFlag.type==0">
                        <input type="text" name="mobilePhone" class="form-control" ng-model="detailInfo.mobilePhone" yb-mobile
                            required yb-focus maxlength="11">
                    </div>
                    <label class="col-xs-5 control-label p-l-n text-left spill-dots" ng-if="tabFlag.type==1">
                        {{ detailInfo.mobilePhone }}
                    </label>
                    <div class="col-xs-4 msg-block" ng-show="form.mobilePhone.$dirty || (form.mobilePhone.$invalid && submitted)">
                        <div class="error-msg" ng-if="form.mobilePhone.$error.required && !form.mobilePhone.focused">
                            <i class="yb-icon ico-times-circular"></i><span>必填项，请填写</span>
                        </div>
                        <div class="error-msg" ng-show="form.mobilePhone.$error.mobile && !form.mobilePhone.focused">
                            <i class="yb-icon ico-times-circular"></i><span>手机号格式错误</span>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label"><i>*</i><span>姓名</span>：</label>
                    <div class="col-xs-5 wrapper-none">
                        <input type="text" name="cname" class="form-control" ng-model="detailInfo.cname" required
                            yb-focus maxlength="20">
                    </div>
                    <div class="col-xs-4 msg-block"
                        ng-show="form.cname.$dirty || (form.cname.$invalid && submitted)">
                        <div class="error-msg" ng-if="form.cname.$error.required && !form.cname.focused">
                            <i class="yb-icon ico-times-circular"></i><span>必填项，请填写</span>
                        </div>
                    </div>
                </div>
                <div class="form-group m-b-xs">
                    <label class="col-xs-2 control-label"><span translate>性别</span>：</label>
                    <label class="col-xs-5 control-label p-l-n text-left">
                        <input type="radio" class="m-r-md pull-left" yb-radio ng-model="detailInfo.sex" value="1"
                            yb-radio-name="男">
                        <input type="radio" class="m-r-md pull-left" yb-radio ng-model="detailInfo.sex" value="0"
                            yb-radio-name="女">
                    </label>
                </div>
                <div class="form-group">
                    <div class="col-xs-offset-2">
                        <button type="button" class="btn btn-primary m-r-sm" ng-click="saveData(form.$valid)">保存</button>
                        <button type="button" class="btn btn-default" ng-click="changeTab(0)">取消</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>